package com.stlm2.dems.dao.impl;

import org.springframework.stereotype.Repository;

import com.stlm2.dems.entity.Messages;
import com.stlm2.dems.dao.MessagesDao;
import com.stlm2.core.base.impl.BaseDaoImpl;

import java.util.List;

@Repository("messagesDao")
public class MessagesDaoImpl extends BaseDaoImpl<Messages> implements MessagesDao {



    @Override
    public List<Messages> getByUserId(Integer userId) {
        return selectList("getByUserId",userId);
    }

    @Override
    public Integer getNotRead(Integer userId) {
        return (Integer)_selectOne("getCountNoRead",userId);
    }
}